#!/usr/bin/env python3
# _*_coding:utf-8 _*_
__author__ = "Gao"
'''定义权限规则

'perm1': {
        'url_type': 0,    # 0表示使用url别名, 1表示绝对路径, 2表示使用正则表达式匹配
        'url': 'stu_my_classes',    # url别名或者绝对路径或者正则表达式
        'method': 'GET',    # 请求方法，包括: GET、POST等
        'args': [],    # 请求的Args,列表内的为白名单。如果列表为空，表示允许所有参数
        'file_args': [],    # 上传文件的Args,列表内的为白名单。如果列表为空，表示允许所有参数
        'hooks': [check_funcs.func1,check_funcs.func2,]    # 自定义验证函数，所有函数都要返回True
    },

'''

from . import check_funcs

perm_dict = {
    'can_access_permission_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/permission',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_permission_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/permission/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_permission_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/permission/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_permission_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/permission/(\d+)/change/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_permission_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/permission/(\d+)/change/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_permission_obj_delete': {
        'url_type': 2,
        'url': r'^/my_admin/crm/permission/(\d+)/delete/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_permission_obj_dodelete': {
        'url_type': 1,
        'url': '/my_admin/crm/permission/doDelete/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_userprofile_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/userprofile',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_userprofile_obj_add': {
        'url_type': 1,
        'url': r'/my_admin/crm/userprofile/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_userprofile_obj_add': {
        'url_type': 1,
        'url': r'/my_admin/crm/userprofile/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_userprofile_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/userprofile/(\d+)/change/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_userprofile_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/userprofile/(\d+)/change/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_userprofile_obj_change_password': {
        'url_type': 2,
        'url': r'^/my_admin/crm/userprofile/(\d+)/password/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_userprofile_obj_change_password': {
        'url_type': 2,
        'url': r'^/my_admin/crm/userprofile/(\d+)/password/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
'can_access_userprofile_obj_delete': {
        'url_type': 2,
        'url': r'^my_admin/crm/userprofile/(\d+)/delete/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
'can_post_userprofile_obj_delete': {
        'url_type': 1,
        'url': '/my_admin/crm/userprofile/doDelete/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_role_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/role',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_role_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/role/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_role_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/role/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_role_obj_change': {
        'url_type': 2,
        'url': '^/my_admin/crm/role/(\d+)/change/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_role_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/role/(\d+)/change/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_role_obj_delete': {
        'url_type': 2,
        'url': r'^/my_admin/crm/role/(\d+)/delete/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_role_obj_delete': {
        'url_type': 1,
        'url': '/my_admin/crm/role/doDelete/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_customer_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/customer',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_customer_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/customer/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_customer_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/customer/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_course_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/course',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_use_course_action': {
        'url_type': 1,
        'url': '/my_admin/crm/course',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_course_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/course/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_course_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/course/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_course_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/course/(\d+)/change/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_course_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/course/(\d+)/change/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_course_obj_delete': {
        'url_type': 2,
        'url': r'^/my_admin/crm/course/(\d+)/delete/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_course_obj_delete': {
        'url_type': 1,
        'url': '/my_admin/crm/course/doDelete/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_tag_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/tag',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_use_tag_action': {
        'url_type': 1,
        'url': '/my_admin/crm/tag',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_tag_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/tag/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_tag_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/tag/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_tag_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/tag/(\d+)/change/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_tag_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/tag/(\d+)/change/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_tag_obj_delete': {
        'url_type': 2,
        'url': r'^/my_admin/crm/tag/(\d+)/delete/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_tag_obj_delete': {
        'url_type': 1,
        'url': '/my_admin/crm/tag/doDelete/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_use_userprofile_action': {
        'url_type': 1,
        'url': '/my_admin/crm/userprofile',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_menu_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/menu',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_menu_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/menu',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_menu_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/menu/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_menu_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/menu/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_menu_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/menu/(\d+)/change/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_menu_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/menu/(\d+)/change/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_menu_obj_delete': {
        'url_type': 2,
        'url': r'^/my_admin/crm/menu/(\d+)/delete/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_menu_obj_delete': {
        'url_type': 1,
        'url': '/my_admin/crm/menu/doDelete/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_customerfollowup_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/customerfollowup',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_customerfollowup_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/customerfollowup',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_customerfollowup_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/customerfollowup/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_customerfollowup_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/customerfollowup/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_customerfollowup_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/customerfollowup/(\d+)/change/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_customerfollowup_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/customerfollowup/(\d+)/change/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_use_customer_action': {
        'url_type': 1,
        'url': '/my_admin/crm/customer',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_customer_obj_delete': {
        'url_type': 1,
        'url': '/my_admin/crm/customer/doDelete/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_classlist_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/classlist',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_classlist_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/classlist',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_classlist_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/classlist/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_branch_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/branch',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_use_branch_action': {
        'url_type': 1,
        'url': '/my_admin/crm/branch',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_branch_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/branch/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_branch_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/branch/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_branch_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/branch/(\d+)/change/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_branch_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/branch/(\d+)/change/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_branch_obj_delete': {
        'url_type': 2,
        'url': r'^/my_admin/crm/branch/(\d+)/delete/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_branch_obj_delete': {
        'url_type': 2,
        'url': r'^/my_admin/crm/branch/doDelete/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_contracttemplate_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/contracttemplate',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_use_contracttemplate_action': {
        'url_type': 1,
        'url': '/my_admin/crm/contracttemplate',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_contracttemplate_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/contracttemplate/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_contracttemplate_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/contracttemplate/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_contracttemplate_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/contracttemplate/(\d+)/change/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_contracttemplate_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/contracttemplate/(\d+)/change/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_contracttemplate_obj_delete': {
        'url_type': 2,
        'url': r'^/my_admin/crm/contracttemplate/(\d+)/delete/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_contracttemplate_obj_delete': {
        'url_type': 1,
        'url': '/my_admin/crm/contracttemplate/doDelete/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_class_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/classlist/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_class_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/classlist/(\d+)/change/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_class_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/classlist/(\d+)/change/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_class_obj_delete': {
        'url_type': 2,
        'url': r'^/my_admin/crm/classlist/2/delete/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_class_obj_delete': {
        'url_type': 1,
        'url': '/my_admin/crm/classlist/doDelete/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_courserecord_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/courserecord',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_use_courserecord_action': {
        'url_type': 1,
        'url': '/my_admin/crm/courserecord',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_courserecord_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/courserecord/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_courserecord_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/courserecord/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_courserecord_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/courserecord/(\d+)/change/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_courserecord_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/courserecord/(\d+)/change/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_courserecord_obj_delete': {
        'url_type': 2,
        'url': r'^/my_admin/crm/courserecord/(\d+)/delete/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_courserecord_obj_delete': {
        'url_type': 1,
        'url': '/my_admin/crm/courserecord/doDelete/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_crm': {
        'url_type': 2,
        'url': r'^/crm.*',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_crm': {
        'url_type': 2,
        'url':r'^/crm.*',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_payment_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/payment',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_use_payment_action': {
        'url_type': 1,
        'url': '/my_admin/crm/payment',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_payment_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/payment/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_payment_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/payment/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_payment_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/payment/(\d+)/change/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_payment_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/payment/(\d+)/change/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_payment_obj_delete': {
        'url_type': 2,
        'url': r'^/my_admin/crm/payment/(\d+)/delete/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_payment_obj_delete': {
        'url_type': 1,
        'url': '/my_admin/crm/payment/doDelete/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_enrollment_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/enrollment',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_use_enrollment_action': {
        'url_type': 1,
        'url': '/my_admin/crm/enrollment',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_customer_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/customer/(\d+)/change/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_customer_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/customer/(\d+)/change/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_enrollment_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/enrollment/(\d+)/change/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_enrollment_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/enrollment/(\d+)/change/$',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_enrollment_obj_delete': {
        'url_type': 2,
        'url': r'^/my_admin/crm/enrollment/(\d+)/delete/$',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_enrollment_obj_delete': {
        'url_type': 1,
        'url': '/my_admin/crm/enrollment/doDelete/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_enrollment_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/enrollment/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_enrollment_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/enrollment/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_studyrecord_detail': {
        'url_type': 1,
        'url': '/my_admin/crm/studyrecord',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_use_studyrecord_action': {
        'url_type': 1,
        'url': '/my_admin/crm/studyrecord',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_studyrecord_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/studyrecord/add/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_studyrecord_obj_add': {
        'url_type': 1,
        'url': '/my_admin/crm/studyrecord/add/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_studyrecord_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/studyrecord/(\d+)/change/',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_studyrecord_obj_change': {
        'url_type': 2,
        'url': r'^/my_admin/crm/studyrecord/(\d+)/change/',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_stu_my_classes': {
        'url_type': 0,
        'url': 'stu_my_classes',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_post_stu_my_classes': {
        'url_type': 0,
        'url': 'stu_my_classes',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': []
    },
    'can_access_studyrecords': {
        'url_type': 0,
        'url': 'studyrecords',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': [check_funcs.auth_studyrecords]
    },
    'can_post_studyrecords': {
        'url_type': 0,
        'url': 'studyrecords',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': [check_funcs.auth_studyrecords]
    },
    'can_access_homework_detail': {
        'url_type': 0,
        'url': 'homework_detail',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': [check_funcs.homework_detail]
    },
    'can_post_homework_detail': {
        'url_type': 0,
        'url': 'homework_detail',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': [check_funcs.homework_detail]
    },
    'can_access_delete_homework': {
        'url_type': 0,
        'url': 'delete_homework',
        'method': 'GET',
        'args': [],
        'file_args': [],
        'hooks': [check_funcs.delete_homework]
    },
    'can_post_delete_homework': {
        'url_type': 0,
        'url': 'delete_homework',
        'method': 'POST',
        'args': [],
        'file_args': [],
        'hooks': [check_funcs.delete_homework]
    },
}